package cn.topevery.garden.dal.dao;

import cn.topevery.garden.entity.po.GreTreeFamous;
import cn.topevery.garden.entity.query.GreTreeFamousQuery;
import cn.topevery.garden.entity.query.GreTreeFamousRecordQuery;
import cn.topevery.garden.entity.vo.GreTreeFamousRecordVO;
import cn.topevery.garden.entity.vo.GreTreeFamousVO;
import cn.topevery.garden.framework.base.BaseDao;
import hw.topevery.framework.db.entity.DataPager;

import java.util.List;
import java.util.Map;

/**
 * 古树名木表
 *
 * @author code-generate
 * @date 2022-01-05
 */
public interface GreTreeFamousDao extends BaseDao<GreTreeFamous> {

    

    /**
     * 获取列表
     *
     * @param query
     */
    DataPager<GreTreeFamousVO> listPage(GreTreeFamousQuery query);

    GreTreeFamous getEntityByColumn(String key,String value);

    DataPager<Map> getList(DataPager<Map> page, Map map);
    DataPager<GreTreeFamousRecordVO> getRecordList(GreTreeFamousRecordQuery query);
    void deleteByIds(List<String> ids, Integer userId);
    void update(GreTreeFamous greTreeFamous, Integer userId);
    void dataPublics(List<Integer> ids, Integer userId);
    void insert(GreTreeFamous greTreeFamous, Integer userId);
    GreTreeFamous getById(Integer id);
    void insertSql(GreTreeFamous greTreeFamous);
    Map<String, Object> getSituation();

    List<Map<String,Object>> getAreaCountStat();

    List<Map<String,Object>> listMaps();

    Integer updateAge(Integer year);

    void updateFamousType();
    List<Map<String,Object>> getAllTreeFamousForMap(int famous_type_id);

    List<GreTreeFamous> getListByCommunityCode(String communityCode, String name);

    GreTreeFamous getByCommunityCodeAndCode(String communityCode, String code);

    /**
     * 按类型查后备资源（导出二维码使用）
     * @param type 1:群落 2:散生
     * @return
     */
    List<GreTreeFamous> getListForQRCode(Integer type);
}
